package com.luxoft.scoremanager.server.model.web;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.luxoft.scoremanager.server.model.dao.StaticDataDaoModel;

import javax.persistence.*;
import java.io.Serializable;



public class StaticData implements Serializable {
    private static final long serialVersionUID = -5170875020617735655L;

    private Integer id;
    private String label;
    private String staticDataSet;

    public StaticData() {

    }

    public StaticData(StaticDataDaoModel staticDataDaoModel) {
        this.setId(staticDataDaoModel.getId());
        this.setLabel(staticDataDaoModel.getLabel());
        this.setStaticDataSet(staticDataDaoModel.getStaticDataSet());
    }

    public StaticData(String label, String staticDataSet) {
        this.label = label;
        this.staticDataSet = staticDataSet;
    }

    public StaticData(Integer id, String label, String staticDataSet) {
        this.id = id;
        this.label = label;
        this.staticDataSet = staticDataSet;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getStaticDataSet() {
        return staticDataSet;
    }

    public void setStaticDataSet(String staticDataSet) {
        this.staticDataSet = staticDataSet;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof StaticData)) return false;

        StaticData that = (StaticData) o;

        if (!id.equals(that.id)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return id.hashCode();
    }

    @Override
    public String toString() {
        return "StaticData{" +
                "id=" + id +
                ", label='" + label + '\'' +
                ", staticDataSet='" + staticDataSet + '\'' +
                '}';
    }
}



